package com.hook3.pianke.activity.base;

import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.FrameLayout;

import com.hook3.pianke.R;
import com.hook3.pianke.activity.MorningStory;

/**
 * Created by Administrator on 2015/12/10.
 */
public class BaseReadActivity extends AppCompatActivity {
    public Toolbar tb_baseread;
    public FrameLayout fl_baseread;
    public Activity activity;

    @TargetApi(Build.VERSION_CODES.LOLLIPOP)
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_baseread);
        tb_baseread = (Toolbar) findViewById(R.id.tb_baseread);
        setSupportActionBar(tb_baseread);
        tb_baseread.setBackgroundResource(R.mipmap.ic_fragment_fm_msking);
        Intent intent = getIntent();
        String coverimg = intent.getStringExtra("url");
        String type = intent.getStringExtra("type");
        int position = intent.getIntExtra("position", 0);
        tb_baseread.setNavigationIcon(R.mipmap.ic_back_black);
        tb_baseread.setTitle("标题");
        tb_baseread.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

        switch (position) {
            case 0:
                new MorningStory(activity, tb_baseread, fl_baseread);
                break;
            case 1:
                break;
            case 2:
                break;
            case 3:
                break;
            case 4:
                break;
            case 5:
                break;
            case 6:
                break;
            case 7:
                break;
            case 8:
                break;
        }


    }
}
